package org.etlt.check;

import org.etlt.job.JobContext;

import java.util.List;

public class CheckResultConsoleReporter extends CheckResultReporter{
    @Override
    public void report(JobContext context, CheckList checkList) {
        List<CheckResult> checkResults = checkList.getCheckResults();
        checkResults.forEach(checkResult -> {
            CheckPoint checkPoint = checkResult.getCheckPoint();
            String detail = checkPoint.getDetail(context);
            System.out.println("[check point] " + detail);
            System.out.println("[check result] " + checkResult.isSuccess());
        });

    }
}
